package factory;

import factory.impl.OperationFactory02Impl;
import service.OperationService;

//增加一个算法工厂接口
public interface OperationFactory02 {
    public OperationService createOperaction();

    //并为每个算法类都定义一个工厂实现类
    public static final String ADD = "add";
    public static final String SUB = "sub";
    public static final String MUL = "mul";
    public static final String DIV = "div";
    //取模
    public static final String MOD = "mod";

    public static final String[] OPERATIONS = {ADD,SUB,MUL,DIV,MOD};

    public static OperationFactory02 createOperactionFactory(String operation) {
        return new OperationFactory02Impl(OPERATIONS);
    }
}
